/* Chart settings styles: final owner for settings panels and forecast help windows. */

html body .sr-settings-panel,
html body .gap-average-panel,
html body .gap-forecast-panel,
html body .gap-forecast-help-panel {
  z-index: 2147483600 !important;
}

html body .sr-settings .sr-settings-reset {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 8px 0 0 !important;
}

html body .gap-forecast-actions {
  margin-top: 8px !important;
}

@media (max-width: 680px) {
  html body .sr-settings,
  html body .gap-average-settings,
  html body .gap-forecast-settings {
    position: static !important;
  }

  html body .sr-settings-panel,
  html body .gap-average-panel,
  html body .gap-forecast-panel,
  html body .gap-forecast-help-panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: 12px !important;
    width: auto !important;
    max-height: calc(100vh - 24px) !important;
    overflow: auto !important;
  }

  html body .sr-settings-panel,
  html body .gap-forecast-panel {
    padding-bottom: 54px !important;
  }

  html body .sr-settings-panel,
  html body .gap-forecast-panel {
    grid-template-columns: 1fr !important;
  }

  html body .sr-settings .sr-settings-reset,
  html body .gap-forecast-actions {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
  }

  html body #chart-root.chart-area > .gap-forecast-card,
  html body .chart-area > .gap-forecast-card {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 210px !important;
    max-height: 320px !important;
    margin: 10px 12px 0 !important;
    overflow: auto !important;
    pointer-events: auto !important;
  }
}

@media (max-height: 500px) and (max-width: 960px) {
  html body .sr-settings,
  html body .gap-average-settings,
  html body .gap-forecast-settings {
    position: static !important;
  }

  html body .sr-settings-panel,
  html body .gap-average-panel,
  html body .gap-forecast-panel,
  html body .gap-forecast-help-panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: 12px !important;
    width: auto !important;
    max-height: calc(100vh - 24px) !important;
    overflow: auto !important;
  }

  html body .sr-settings-panel,
  html body .gap-forecast-panel {
    padding-bottom: 54px !important;
  }

  html body .sr-settings-panel,
  html body .gap-forecast-panel {
    grid-template-columns: 1fr !important;
  }

  html body .sr-settings .sr-settings-reset,
  html body .gap-forecast-actions {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
  }

  html body #chart-root.chart-area > .gap-forecast-card,
  html body .chart-area > .gap-forecast-card {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 180px !important;
    max-height: 260px !important;
    margin: 10px 12px 0 !important;
    overflow: auto !important;
    pointer-events: auto !important;
  }
}
